import javax.swing.*;
import java.awt.BorderLayout;
import java.awt.GridBagLayout;
import java.awt.GridBagConstraints;
import java.awt.Insets;
import java.awt.Color;
import javax.swing.border.LineBorder;

public class HealthHistoryGUI extends JPanel{
    
    /**
     * This class creates the Health History Table. If I knew how to just import the database for that user into a panel, I would. 
     * I don't, however, so this has labels that will be updated and pull the correct information out of the Database. There are 
     * buttons to the right of each entry. If clicked, they can pull up the individual treatment record for that day. 
     */
    
    private static final long serialVersionUID = 1L;
    public HealthHistoryGUI() {
        setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
        
        JPanel panel = new JPanel();
        add(panel);
        panel.setLayout(new BorderLayout(0, 0));
        
        JScrollPane scrollPane = new JScrollPane();
        panel.add(scrollPane);
        
        JLabel lblNewLabel = new JLabel("Patient's Name Health History");
        scrollPane.setColumnHeaderView(lblNewLabel);
        
        JPanel panel_1 = new JPanel();
        panel_1.setBorder(new LineBorder(new Color(0, 0, 0), 2));
        scrollPane.setViewportView(panel_1);
        GridBagLayout gbl_panel_1 = new GridBagLayout();
        gbl_panel_1.columnWidths = new int[]{0, 0, 0, 0, 0, 0, 0, 0};
        gbl_panel_1.rowHeights = new int[]{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
        gbl_panel_1.columnWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
        gbl_panel_1.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
        panel_1.setLayout(gbl_panel_1);
        
        JLabel lblDate = new JLabel("Date");
        GridBagConstraints gbc_lblDate = new GridBagConstraints();
        gbc_lblDate.insets = new Insets(0, 0, 5, 5);
        gbc_lblDate.gridx = 1;
        gbc_lblDate.gridy = 0;
        panel_1.add(lblDate, gbc_lblDate);
        
        JLabel lblTime = new JLabel("Time");
        GridBagConstraints gbc_lblTime = new GridBagConstraints();
        gbc_lblTime.insets = new Insets(0, 0, 5, 5);
        gbc_lblTime.gridx = 2;
        gbc_lblTime.gridy = 0;
        panel_1.add(lblTime, gbc_lblTime);
        
        JLabel lblNewLabel_2 = new JLabel("Treating Doctor");
        GridBagConstraints gbc_lblNewLabel_2 = new GridBagConstraints();
        gbc_lblNewLabel_2.insets = new Insets(0, 0, 5, 5);
        gbc_lblNewLabel_2.gridx = 3;
        gbc_lblNewLabel_2.gridy = 0;
        panel_1.add(lblNewLabel_2, gbc_lblNewLabel_2);
        
        JLabel lblAttendingNurse = new JLabel("Attending Nurse");
        GridBagConstraints gbc_lblAttendingNurse = new GridBagConstraints();
        gbc_lblAttendingNurse.insets = new Insets(0, 0, 5, 5);
        gbc_lblAttendingNurse.gridx = 4;
        gbc_lblAttendingNurse.gridy = 0;
        panel_1.add(lblAttendingNurse, gbc_lblAttendingNurse);
        
        JLabel lblSymptoms = new JLabel("Symptoms");
        GridBagConstraints gbc_lblSymptoms = new GridBagConstraints();
        gbc_lblSymptoms.insets = new Insets(0, 0, 5, 5);
        gbc_lblSymptoms.gridx = 5;
        gbc_lblSymptoms.gridy = 0;
        panel_1.add(lblSymptoms, gbc_lblSymptoms);
        
        JLabel lblVitalSigns = new JLabel("Vital Signs");
        GridBagConstraints gbc_lblVitalSigns = new GridBagConstraints();
        gbc_lblVitalSigns.insets = new Insets(0, 0, 5, 5);
        gbc_lblVitalSigns.gridx = 6;
        gbc_lblVitalSigns.gridy = 0;
        panel_1.add(lblVitalSigns, gbc_lblVitalSigns);
        
        JLabel lblDiagnosis = new JLabel("Diagnosis");
        GridBagConstraints gbc_lblDiagnosis = new GridBagConstraints();
        gbc_lblDiagnosis.insets = new Insets(0, 0, 5, 5);
        gbc_lblDiagnosis.gridx = 7;
        gbc_lblDiagnosis.gridy = 0;
        panel_1.add(lblDiagnosis, gbc_lblDiagnosis);
        
        JLabel lblDoctorsOrders = new JLabel("Doctors Orders");
        GridBagConstraints gbc_lblDoctorsOrders = new GridBagConstraints();
        gbc_lblDoctorsOrders.insets = new Insets(0, 0, 5, 0);
        gbc_lblDoctorsOrders.gridx = 8;
        gbc_lblDoctorsOrders.gridy = 0;
        panel_1.add(lblDoctorsOrders, gbc_lblDoctorsOrders);
        
        GridBagConstraints gbc_lblNewLabel_6 = new GridBagConstraints();
        gbc_lblNewLabel_6.insets = new Insets(0, 0, 5, 5);
        gbc_lblNewLabel_6.gridx = 5;
        gbc_lblNewLabel_6.gridy = 1;
        
        JLabel lblNewLabel_7 = new JLabel("New label");
        GridBagConstraints gbc_lblNewLabel_7 = new GridBagConstraints();
        gbc_lblNewLabel_7.insets = new Insets(0, 0, 5, 5);
        gbc_lblNewLabel_7.gridx = 7;
        gbc_lblNewLabel_7.gridy = 2;
        panel_1.add(lblNewLabel_7, gbc_lblNewLabel_7);
        
        JButton button = new JButton("1.");
        GridBagConstraints gbc_button = new GridBagConstraints();
        gbc_button.insets = new Insets(0, 0, 5, 5);
        gbc_button.gridx = 0;
        gbc_button.gridy = 2;
        panel_1.add(button, gbc_button);
        
        
        JLabel lblNewLabel_3 = new JLabel("New label");
        GridBagConstraints gbc_lblNewLabel_3 = new GridBagConstraints();
        gbc_lblNewLabel_3.insets = new Insets(0, 0, 5, 5);
        gbc_lblNewLabel_3.gridx = 2;
        gbc_lblNewLabel_3.gridy = 2;
        panel_1.add(lblNewLabel_3, gbc_lblNewLabel_3);
        
        JLabel lblNewLabel_4 = new JLabel("New label");
        GridBagConstraints gbc_lblNewLabel_4 = new GridBagConstraints();
        gbc_lblNewLabel_4.insets = new Insets(0, 0, 5, 5);
        gbc_lblNewLabel_4.gridx = 3;
        gbc_lblNewLabel_4.gridy = 2;
        panel_1.add(lblNewLabel_4, gbc_lblNewLabel_4);
        
        JLabel lblNewLabel_5 = new JLabel("New label");
        GridBagConstraints gbc_lblNewLabel_5 = new GridBagConstraints();
        gbc_lblNewLabel_5.insets = new Insets(0, 0, 5, 5);
        gbc_lblNewLabel_5.gridx = 4;
        gbc_lblNewLabel_5.gridy = 2;
        panel_1.add(lblNewLabel_5, gbc_lblNewLabel_5);
        
        JLabel lblNewLabel_1 = new JLabel("New label");
        GridBagConstraints gbc_lblNewLabel_1 = new GridBagConstraints();
        gbc_lblNewLabel_1.insets = new Insets(0, 0, 5, 5);
        gbc_lblNewLabel_1.gridx = 5;
        gbc_lblNewLabel_1.gridy = 2;
        panel_1.add(lblNewLabel_1, gbc_lblNewLabel_1);
        
        JButton btnDoctorsOrders = new JButton("Doctors Orders");
        GridBagConstraints gbc_btnDoctorsOrders = new GridBagConstraints();
        gbc_btnDoctorsOrders.insets = new Insets(0, 0, 5, 0);
        gbc_btnDoctorsOrders.gridx = 8;
        gbc_btnDoctorsOrders.gridy = 2;
        panel_1.add(btnDoctorsOrders, gbc_btnDoctorsOrders);
        
        JButton btnVitalSigns = new JButton("Vital Signs");
        GridBagConstraints gbc_btnVitalSigns = new GridBagConstraints();
        gbc_btnVitalSigns.insets = new Insets(0, 0, 5, 5);
        gbc_btnVitalSigns.gridx = 6;
        gbc_btnVitalSigns.gridy = 2;
        panel_1.add(btnVitalSigns, gbc_btnVitalSigns);
        
        JButton button_1 = new JButton("2.");
        GridBagConstraints gbc_button_1 = new GridBagConstraints();
        gbc_button_1.insets = new Insets(0, 0, 5, 5);
        gbc_button_1.gridx = 0;
        gbc_button_1.gridy = 4;
        panel_1.add(button_1, gbc_button_1);
        
        JButton button_2 = new JButton("3.");
        GridBagConstraints gbc_button_2 = new GridBagConstraints();
        gbc_button_2.insets = new Insets(0, 0, 5, 5);
        gbc_button_2.gridx = 0;
        gbc_button_2.gridy = 6;
        panel_1.add(button_2, gbc_button_2);
        
        JPanel panel_2 = new JPanel();
        panel.add(panel_2, BorderLayout.SOUTH);
        
        JButton btnPatientInformation = new JButton("Patient Information");
        panel_2.add(btnPatientInformation);
        
        JButton btnHealthInformation = new JButton("Health Information");
        panel_2.add(btnHealthInformation);
        
        
    }

}
